[WasmFS] Skip root directory setup under NODERAWFS#26607
Conversation
This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (2) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_wasmfs.json: 179737 => 179764 [+27 bytes / +0.02%] codesize/test_codesize_files_wasmfs.json: 63883 => 63908 [+25 bytes / +0.04%] Average change: +0.03% (+0.02% - +0.04%) ```
| virtual std::shared_ptr<Directory> createDirectory(mode_t mode) = 0; | ||
| virtual std::shared_ptr<Symlink> createSymlink(std::string target) = 0; | ||
|
|
||
| virtual bool shouldMountSpecialFiles() { return true; } |
There was a problem hiding this comment.
I was thinking maybe shouldPopulateRoot, but maybe your name is more explicit?
There was a problem hiding this comment.
This function name was mentioned in comment #24733 (comment). But I'd like shouldPopulateRoot as well.
There was a problem hiding this comment.
Changed to shouldPopulateRoot with commit 98baba6.
| self.set_setting('WASMFS') | ||
| self.do_run_in_out_file_test('wasmfs/wasmfs_chown.c') | ||
|
|
||
| @wasmfs_all_backends |
There was a problem hiding this comment.
Why remove this?
Does wasmfs_getdents.c need to get re-written to handle the rawfs mabye?
There was a problem hiding this comment.
Should we just skip under NODERAWFS rather than removing wasmfs_all_backends completely?
There was a problem hiding this comment.
I re-added the @wasmfs_all_backends decorator and skipped this only under NODERAWFS with commit f3b85c9.
See for details:
emscripten/test/wasmfs/wasmfs_getdents.out
Lines 51 to 59 in 34f6bcf
|
Perhaps this setup logic belongs in the $ tree / -L 3 --dirsfirst
/ (NODERAWFS)
└── memory (MEMFS)
├── dev
│ ├── null -> SpecialFiles::getNull()
│ ├── random -> SpecialFiles::getRandom()
│ ├── stderr -> SpecialFiles::getStderr()
│ ├── stdin -> SpecialFiles::getStdin()
│ ├── stdout -> SpecialFiles::getStdout()
│ └── urandom -> SpecialFiles::getURandom()
└── tmpThis would avoid the need of the |
This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (2) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_wasmfs.json: 179773 => 179800 [+27 bytes / +0.02%] codesize/test_codesize_files_wasmfs.json: 63899 => 63924 [+25 bytes / +0.04%] Average change: +0.03% (+0.02% - +0.04%) ```
This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (2) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_wasmfs.json: 179751 => 179778 [+27 bytes / +0.02%] codesize/test_codesize_files_wasmfs.json: 63811 => 63836 [+25 bytes / +0.04%] Average change: +0.03% (+0.02% - +0.04%) ```
This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (2) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_wasmfs.json: 179751 => 179778 [+27 bytes / +0.02%] codesize/test_codesize_files_wasmfs.json: 63811 => 63836 [+25 bytes / +0.04%] Average change: +0.03% (+0.02% - +0.04%) ```
This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (1) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_wasmfs.json: 179733 => 179760 [+27 bytes / +0.02%] Average change: +0.02% (+0.02% - +0.02%) ```
This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (2) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_wasmfs.json: 179741 => 179768 [+27 bytes / +0.02%] codesize/test_codesize_files_wasmfs.json: 63892 => 63917 [+25 bytes / +0.04%] Average change: +0.03% (+0.02% - +0.04%) ```
sbc100
left a comment
There was a problem hiding this comment.
lgmt, with testing question
| @wasmfs_all_backends | ||
| def test_wasmfs_getdents(self): | ||
| if self.get_setting('NODERAWFS'): | ||
| self.skipTest('test expectations assumes /dev is virtualized') |
There was a problem hiding this comment.
Are there no tests that can now be enabled by this change?
Seems a little odd that this change would strictly make more tests fail.
There was a problem hiding this comment.
PR #24733 (from which this change is split out) would allow more tests to be enabled (e.g. it removes the skip for other.test_fs_dev_random which is currently disabled in this PR).
The downside of splitting this change early is that absolute path access under -sNODERAWFS mode in WasmFS is still broken. So, opening /dev/random under -sNODERAWFS -sWASMFS after this PR lands will no longer work, since it's a absolute path that is no longer virtualized. Though, this only affects the -sNODERAWFS -sWASMFS combo, which is likely not widely used (and -sWASMFS is still marked experimental).
This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (1) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_wasmfs.json: 179724 => 179751 [+27 bytes / +0.02%] Average change: +0.02% (+0.02% - +0.02%) ```
Resolves: #24836.
Split out from #24733.